home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / imlib / include / visobj.hpp < prev    next >
C/C++ Source or Header  |  1996-04-11  |  1KB  |  45 lines

  1. #ifndef VIS_OBJECT_HPP
  2. #define VIS_OBJECT_HPP
  3.  
  4. #include "jwindow.hpp"
  5. #include "filter.hpp"
  6.  
  7. class visual_object
  8. {
  9.   public :
  10.   virtual void draw(image *screen, int x, int y, window_manager *wm, filter *f) = 0;
  11.   virtual int width(window_manager *wm) = 0;
  12.   virtual int height(window_manager *wm) = 0;
  13. } ;
  14.  
  15.  
  16.  
  17. class image_visual : public visual_object
  18. {
  19.   public :
  20.   image *im;
  21.  
  22.   image_visual(image *img) { im=img; }
  23.   virtual void draw(image *screen, int x, int y, 
  24.             window_manager *wm, filter *f);
  25.   virtual int width(window_manager *wm) { return im->width(); }
  26.   virtual int height(window_manager *wm) { return im->height(); }
  27. } ;
  28.  
  29.  
  30. class string_visual : public visual_object
  31. {
  32.   char *st;
  33.   int color;
  34.   int w,h;
  35.   public :
  36.   string_visual(char *string, int Color);
  37.   virtual void draw(image *screen, int x, int y, 
  38.             window_manager *wm, filter *f);
  39.   virtual int width(window_manager *wm); 
  40.   virtual int height(window_manager *wm);
  41. } ;
  42.  
  43.  
  44. #endif
  45.